<?php
if(isset($_SERVER['HTTP_ORIGIN'])){
    $origin=$_SERVER['HTTP_ORIGIN'];
    $allow_origin=["localhost","null"];
    if(in_array($origin,$allow_origin)){
        header("Access-Control-Allow-Origin:$origin");
    }
}
echo json_encode(["code"=>1]);
